home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
t3_1
/
tman.lha
/
tman
/
manual.m4
(
.txt
)
< prev
next >
Wrap
LaTeX Document
|
1988-10-28
|
9KB
|
326 lines
divert(-1) ;-*-Outline-*-
WARNING:
Beware of comma, quote, quasiquote, and hash. The claws that catch,
the jaws that bite.
*======== Internals - probably shouldnt be used in the body of the manual.
** ==== LaTeX, Texinfo ====
These determine whether a LaTeX or a Texinfo file is output when the
manual source is run through m4.
Put the one you want last.
define(__type,`texinfo')
define(__type,`latex')
__alt2 (latex-ver,texinfo-ver)
define(__alt2,
`ifelse(__type,`latex',`$1',
__type,`texinfo',`$2')')
__alt3 (latex-ver,info-ver,tex-ver)
define(_alt3,
`ifelse(__type,`latex',`$1',
__type,`texinfo',`
@ifinfo
@end ifinfo
@iftex
@end tex
)')
** ==== Constructors for Latex/Tex/Info sensative commands.
_include (latex-file,texinfo-file)
define(_include,
`__alt2(`include(`$1')',
`include(`$2')')')
defmacro (name,latex-ver,texinfo-ver)
define(defmacro,
`errprint(`use defmacro2')')
defmacro2 (name,latex-ver,texinfo-ver)
define(defmacro2,
`define($1,`__alt2(`$2',`$3')')')
defmacro3 (name,latex-ver,info-ver,tex-ver)
define(defmacro3,
`define($1,`__alt3(`$2',`$3',`$4')')')
defmacroEnv (name,Common-Beginning,latex-ver,info-ver,tex-ver,Common-Ending)
define(defmacroEnv,
`define($1,`__alt(`$2$3$6',`$2$4$6',`$2$5$6')')')
*======== Externals - these are used in the body of the manual.
** ==== compat (equivalents)
defmacro2(_horizline,`\makebox[0.5\textwidth]{\hrulefill}',
`@center -----------------------------------------------------')
defmacro2(_cite,`\cite{$1}',`')
defmacro2(_label,`\label{$1}',`')
defmacro2(_index,`\index{$1}',`')
defmacro2(_tindex,`\index{$1@_Fcode($1)}',`')
defmacro2(_ix,`\ix{$1}',`')
defmacro2(_iix,`\iix{$1}',`')
defmacro2(_tix,`_Fcode($1)_tindex($1)',`')
defmacro2(_wt,`{\mbox _Fcode($1)}',`')
defmacro2(_rm,`{\rm $1}',`$1')
define(_r3rs,`Revised3 Report on Scheme')
defmacro2(_experimental,`\marginpar{\bf experimental}',`')
defmacro2(_changing,`\marginpar{\bf changing}',`')
defmacro2(_changed,`\marginpar{\bf changed}',`')
defmacro2(_Ref,`\ref{$1}',`')
defmacro2(_Pageref,`\pageref{$1}',`')
** ==== util
***_Comment (whatever) WHEN COMMENTING M4 STUFF, QUOTE IT! _Comment(`stuff')
define(_Comment,`dnl')
***_DComment (whatever)
define(_DComment,`dnl')
***_Inc (filename-wo-ext)
If you change ../, also change early line in 0manual.x .
define(_Inc,`include(`../$1')')
***_IfLatex (stuff)
define(_IfLatex,`__alt2(`$1$2$3$4$5$6$7$8$9',`')')
***_IfTexinfo (stuff)
define(_IfTexinfo,`__alt2(`',`$1$2$3$4$5$6$7$8$9')')
***_IfInfo (stuff)
define(_IfInfo,`__alt3(`',`$1$2$3$4$5$6$7$8$9',`')')
***_IfTex (stuff)
define(_IfTex,`__alt3(`',`',`$1$2$3$4$5$6$7$8$9')')
** ==== organization
***_Chapter (name)
defmacro2(_Chapter,`\chapter{$1}
',`_Comment()
@node $1`,' $2`,' $3`,' $4
@chapter $1
***_ChapUnum (name)
defmacro2(_ChapUnum,`\chapter*{$1}
',`_Comment()
@node $1`,' $2`,' $3`,' $4
@unnumbered $1
***_Appendix (name) need some change here
defmacro2(_Appendix,`\chapter{$1}
',`')
***_Section (name)
defmacro2(_Section,`\section{$1}
',`_Comment()
@node $1`,' $2`,' $3`,' $4
@section $1
***_SubSection (name)
defmacro2(_SubSection,`\subsection{$1}
',`_Comment()
@node $1`,' $2`,' $3`,' $4
@subsection $1
***_SubSubSection (name)
defmacro2(_SubSubSection,`',`')
** ==== formating commands
defmacro2(_sub,`_a(`$1',`$_{\hbox{$2}}$')',`$1<sub>$2')
defmacro2(_sup,`_a(`$1',`$^{\hbox{$2}}$')',`$1<tothe>$2<th>')
***_a? append
define(_a,$1$2$3$4$5$6$7$8$9)
***_R refill
defmacro2(_R,`',`@refill')
***_NoSp @:
defmacro2(_NoSp,`',`@:')
***_Period @.
defmacro2(_Period,`',`@.')
***_NL
defmacro2(_NL,`',`@*')
defmacro2(_LNL,`\\',`')
** ==== font
define(_tc,`_Ftt(`$1$2$3$4$5$6$7$8$9')')
define(_wt,`_Xc(`$1$2$3$4$5$6$7$8$9')')
define(_em,`_Fbf(`$1$2$3$4$5$6$7$8$9')')
_Fit (italic)
defmacro2(_Fit,`{\it `$1$2$3$4$5$6$7$8$9'\/}',`@t{`$1$2$3$4$5$6$7$8$9'}')
_Fbf (bold)
defmacro2(_Fbf,`{\bf `$1$2$3$4$5$6$7$8$9'}',`@b{`$1$2$3$4$5$6$7$8$9'}')
_Ftt (teletype)
defmacro2(_Ftt,`{\tt `$1$2$3$4$5$6$7$8$9'}',`@b{`$1$2$3$4$5$6$7$8$9'}')
_Fsc (small caps)
defmacro2(_Fsc,`{\sc `$1$2$3$4$5$6$7$8$9'}',`@b{`$1$2$3$4$5$6$7$8$9'}')
_Fdfn (introductory-use-of-term)
defmacro2(_dfn,`_Fit(`$1$2$3$4$5$6$7$8$9')',`@dfn{`$1$2$3$4$5$6$7$8$9'}')
_Fcite (citation)
defmacro2(_Fcite,`_it(`$1$2$3$4$5$6$7$8$9')',`@cite{`$1$2$3$4$5$6$7$8$9'}')
dorab: used to be \sc i changed it to \tt
_Fcode (stuff)
defmacro2(_Fcode,
`{\tt `$1$2$3$4$5$6$7$8$9'}',
`@code{`$1$2$3$4$5$6$7$8$9'}')
_Fsem (symantic-element)
defmacro2(_Fsem,
`{\it `$1$2$3$4$5$6$7$8$9'}',
`@var{`$1$2$3$4$5$6$7$8$9'}')
** ==== characters
defmacro2(_cAND,`\&',`&')
defmacro2(_cAT,`@',`@@')
defmacro2(_cPo,``('',``('')
defmacro2(_cPc,`)',`)')
defmacro2(_cBo,`\{',`@{')
defmacro2(_cBc,`\}',`@}')
defmacro2(_cDL,`\$',`$')
defmacro2(_cGT,`$>$',`>')
defmacro2(_cGE,`$\geq$',`>=')
defmacro2(_cH,``\#'',`#')
defmacro2(_cHT,`\verb!^!',`^')
defmacro2(_cLT,`$<$',`<')
defmacro2(_cLE,`$\leq$',`<=')
defmacro2(_cM,`$-$',`')
defmacro2(_cP,`\%',`%')
defmacro2(_cQ,`"',`"')
defmacro2(_cSL,`{$\backslash$}',`\')
defmacro2(_cTL,`$\tilde{}$',`~')
defmacro2(_cUL,`\_',`_')
defmacro2(_cVL,`$|$',`|')
DONT USE AS ARGUMENT TO ANYTHING.
define(_cQc,changequote([,])[']changequote)
define(_cQo,changequote({,}){changequote([,])[`]changequote} changequote)
If space before changequote is removed, thing breaks.
** ==== words
_qu: normal double quotes
defmacro2(_qu,````$1$2$3$4$5$6$7$8$9'''',`"`$1$2$3$4$5$6$7$8$9'"')
_exqu: double quotes in example environments
defmacro2(_exqu,`"`$1$2$3$4$5$6$7$8$9'"',`"`$1$2$3$4$5$6$7$8$9'"')
defmacro2(_txar,`-$>$',`->')
defmacro2(_evalto,`$\Longrightarrow$\ ',`==>')
defmacro2(_parsesto,`$\Longrightarrow$\ ',`==>')
defmacro2(_equiv,`$\equiv$',`==')
defmacro2(_yl,`$\longrightarrow$\ ',`-->')
defmacro2(_dots,`\ldots\ ',`@dots{}')
defmacro2(_star,`$^*$\ ',`*')
defmacro2(_plus,`$^+$',`+')
defmacro2(_or,`$|$',`|')
defmacro2(_changedto,`$\longrightarrow$\ ',`-->')
define(_T,`_Fbf(T)')
define(_T3,`_Fbf(T3)')
define(_Tv,`_Fbf(T$1)')
define(_orbit,`_Fsc(`orbit')')
define(_Undefined,_Fsem(`undefined'))
define(_true,`_cH()_Ftt(T)')
define(_false,`_cH()_Ftt(F)')
_Xw (unbreakable-stuff)
defmacro2(_Xw,
`{\mbox {`$1$2$3$4$5$6$7$8$9'}}',
`@w{`$1$2$3$4$5$6$7$8$9'}')
_Xc (unbreakable-code)
define(_Xc,_Xw(`_Fcode(`$1$2$3$4$5$6$7$8$9')'))
define(_example,`_Xc(`$1$2$3$4$5$6$7$8$9')')
defmacro2(_char,`_a(``{\#$\backslash$}'',$1)',`#\')
defmacro2(_key,`_Fcode($1)',`@key ...')
** ==== Defs
see also _Desc environment
defmacro2(_Comdef,`_tindex(`$1')
_wt(`$3')
\hfill $2
',`')
defmacro2(_Comdef2,`_tindex(`$2')
_wt(`$4')
\hfill $3
',`')
defmacro2(_Comdefb,`_tindex(`$1')
_wt(`$3')
\hfill $2
\\ _wt(`$4')
',`')
_Word (t-word,semantic-invoke,semantic-result,type,availibility)
defmacro2(_Word,
`define(XXXX,`$1')_index(`$1')',
`\code{$2 _yl $3} \unimp{$4} \unimp{$5}',
`$2 _evalto $3 $4 $5',
`undefine(`XXXX')')
** ==== Environments
***_Desc environment
defmacro2(_begin_Desc,
`_begin_Inset()',
`')
defmacro2(_end_Desc,
`_end_Inset',
`@refill')
***_Ignore environment
defmacro2(_begin_Ignore,
`_Comment(',
`_Comment(')
defmacro2(_end_Ignore,
`)',
`)')
***_Quotation environment
defmacro2(_begin_Quotation,
`\begin{unimp}
`@quotation
defmacro2(_end_Quotation,
`\end{unimp}
`@end quotation
***_Example environment
defmacro2(_begin_Example,
`\begin{codexenv}',
`@example
defmacro2(_end_Example,
`\end{codexenv}',
`@end example
defmacro2(_begin_ExampleTabular,
`\begin{codexenv}
\begin{tabular}{lll}',
`@example
defmacro2(_end_ExampleTabular,
`\end{tabular}
\end{codexenv}',
`@end example
defmacro2(_colsep,`&',`')
defmacro2(_begin_ExampleTabbing,
`{\tt \begin{tabbing}',
`@example
defmacro2(_end_ExampleTabbing,
`\end{tabbing}}',
`@end example
defmacro2(_settab,`\= ',`')
defmacro2(_gotab,`\> ',`')
defmacro2(_incrtab,`\+ ',`')
defmacro2(_decrtab,`\- ',`')
***_Display environment
defmacro2(_begin_Display,
`\begin{verse}',
`@display
defmacro2(_end_Display,
`\end{verse}',
`@end display
***_Inset environment
defmacro2(_begin_Inset,
`\begin{inset}{$1}',
`')
defmacro2(_end_Inset,
`\end{inset}',
`')
***_T3env environment
defmacro2(_begin_T3env,
`_begin_Inset
_Fbf(_T3 only:)
`')
defmacro2(_end_T3env,
`_end_Inset',
`')
** ==== List Environments
_Item and _Itemx
defmacro2(_Item,
`\item[{$1}]',
`@item $1')
defmacro2(_Itemx,
`\unimp{}',
`@itemx $1')
_Table environment
defmacro2(_begin_Table,
`\begin{description}',
`@table @b
defmacro2(_end_Table,
`\end{description}',
`@end table
_Itemize environment
defmacro2(_begin_Itemize,
`\begin{itemize}',
`@itemize
defmacro2(_end_Itemize,
`\end{itemize}',
`@end itemize
* Undefining of unneeded M4 stuff. (complete?)
undefine(`defmacro')
undefine(`define')
undefine(`divnum')
undefine(`errprint')
undefine(`eval')
undefine(`maketemp')
undefine(`substr')
undefine(`syscmd')
undefine(`translit')
undefine(`undivert')
undefine(`index')
undefine(`unix')
undefine(`undefine')
*divert(0)